package com.dwxt.community.task;


import com.dwxt.community.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.text.ParseException;

@Component
public class Task {

    @Autowired
    private TaskService taskService;

    @Async("myExecutor")
    @Scheduled(cron = "0 55 23 * * ? ")
    public void lookUserData() throws ParseException {
        //System.out.println(Thread.currentThread().getName());
        //System.out.println(123);
        taskService.lookUserData();
    }
}
